<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class CreateOpenShopProcessDetailNoticeEmployeesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('open_shop_process_detail_notice_employees', function (Blueprint $table) {
            $table->id();
            $table->string('orderNo', 60)->index('orderNo')->default('')->comment('订单编号');
            $table->unsignedSmallInteger('step')->default(0)->comment('主流程进程');
            $table->unsignedSmallInteger('processType')->default(0)->comment('子流程进程');
            $table->text('noticeEmployeeUids')->comment('被通知的用户的rms.userId列表，以逗号隔开');
            $table->unsignedInteger('createdAt')->default(0)->comment('创建时间');
            $table->unsignedInteger('createdByUid')->default(0)->comment('创建人');
            $table->unsignedInteger('updatedAt')->default(0)->comment('修改时间');
            $table->unsignedInteger('updatedByUid')->default(0)->comment('修改人');
            $table->collation = 'utf8mb4_general_ci';
            $table->comment = '子流程通知人员列表';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('open_shop_process_detail_notice_employees');
    }
}
